home *** CD-ROM | disk | FTP | other *** search
/ ASP Advantage 1993 / The Association of Shareware Professionals Advantage CD-ROM 1993.iso / files / commions / ca29_1 / ca29_3.exe / VT52.CMD < prev    next >
OS/2 REXX Batch file  |  1992-09-24  |  2KB  |  61 lines

  1.     SET TTHRU OFF
  2.     LEGEND "Installing VT52 emulation"
  3. ;
  4. ; ----- Set an emulation, enabling both display and remap
  5. ;    commenced: 9/23/92 R.McG
  6. ; ----------------------------------------------------------------
  7. ;    Note: This script creates the file COM-AND.RMP on the default
  8. ;    subdirectory (if no COM-AND= subdir) or on the COM-AND= subdir.
  9. ;    An existing COM-AND.RMP is destroyed.
  10. ; ----------------------------------------------------------------
  11. ;
  12. ;    If COM-AND.RMP is on the current subdirectory, use it
  13. ;
  14.     S0 = "COM-AND.RMP"        ; Default to current subdir
  15.     IF ISFILE S0 GOTO WriteRMP    ; Skip if on current subdir
  16. ;
  17. ;    Construct the file name with the COM-AND= pathing (if provided)
  18. ;
  19.     ENVIRON S1 "COM-AND="        ; Look for COM-AND= environment var
  20.     IF FOUND            ; If environment variable found
  21.        S1 = S1&""            ; Trim trailing blanks
  22.        LENGTH S1 N0            ; Get its length
  23.        IF N0 GT 0            ; If trimmed len > 0
  24.           IF NOT STRCMP S1(n0-1:n0-1) "\" S1 = S1&"\"
  25.        ELSE
  26.           S1 = ""
  27.           ENDIF
  28.        S0 = S1&S0            ; Concatenate path and name
  29.        ENDIF
  30. ;
  31. ;    Open the output file and write the remap
  32. ;
  33. WriteRMP:
  34.     S0 = "COM-AND.RMP"
  35.     FOPENO S0 text
  36.     IF FAILED
  37.        MESS "Cannot open "*S0
  38.        EXIT
  39.        ENDIF
  40.     WRITE "^@S^A^@H^C^[[A^@P^C^[[B^@K^C^[[C^@M^C"
  41.     WRITE "^[[D^@G^C^[[H^@O^C^[[K^@v^G^[[H^[[ J^@"
  42.     WRITE "ä^C^[[M^@w^C^[[L^@n^C^[Oq^@o^C^[Or^@Z^C"
  43.     WRITE "^[Os^@l^C^[Ot^@m^C^[Ou^@X^C^[Ov^@j^C^["
  44.     WRITE "Ow^@k^C^[Ox^@V^C^[Oy^@p^C^[Op^@q^C^[Op"
  45.     WRITE "^@g^B^@q^@h^C^[OP^@i^C^[OQ^@T^C^[OS^@"
  46.     WRITE "U^C^[OT^@a^C^[Om^@b^C^[Ol^@e^C^[OM^@f^C"
  47.     WRITE "^[On"
  48. ;
  49. ;    Add a remap for F10 (help) if help script is installed
  50. ;
  51.     IF ISSC "VT52.HLP"
  52.        WRITE "^@D^J VT52.HLP^M^@^@" ; The " " is char value 255
  53.        ENDIF
  54.     FCLOSEO                ; Close the file
  55. ;
  56. ; ----- Enable display emulation and remap
  57. ;
  58.     EMULATE VT52            ; Display emulation
  59.     SET REMAP ON            ; Load new remap file
  60.     EXIT
  61.